<!--
 * @描述：【当前余额】
 * @作者：lichenguang
 * @时间: 2022/2/24 23:02
-->
<template>
  <div class="app-container">
    <el-table :data="tableData" style="width: 100%" border v-loading="loading">
      <el-table-column prop="cnName" label="币种" align="center"></el-table-column>
      <el-table-column prop="available" label="可用" align="center"></el-table-column>
      <el-table-column prop="freez" label="冻结" align="center"></el-table-column>
    </el-table>
  </div>
</template>

<script>
  import {balance} from '@/api/modules/account'

  export default {
    name: "BalanceNow",
    data() {
      return {
        tableData: [],
        userId: this.$route.query.userId,
        loading: false
      }
    },
    created() {
      this.list()
      this.loading = true
    },
    methods: {
      list() {
        balance({'userId': this.userId}).then(res => {
          this.tableData = res.data
          this.loading = false
        })
      }
    }
  }
</script>

<style scoped>

</style>
